package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.StrategyComment;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyCommentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyComment record);

    StrategyComment selectByPrimaryKey(Long id);

    List<StrategyComment> selectAll();

    int updateByPrimaryKey(StrategyComment record);

    List<StrategyComment> getList(QueryObject qo);

    List<StrategyComment> getCommentByStrategyId(Long strategyId);

    List<StrategyComment> selectCommentByState();

    List<StrategyComment> selectByMentions(String keyword);

    List<StrategyComment> selectByAuthorId(Long id);

    Integer getNoReadMentions(@Param("keyword") String keyword, @Param("hasRead") Integer hasRead);

    void setCommentsHasRead(String keyword);

    int getCount(Long id);
}